﻿@model Wicresoft.SelfService.DAO.ServiceDetail
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/swfobject.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.uploadify.v2.1.4.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/uploadFiles.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/popupWindows.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/approveActions.js")" type="text/javascript"></script>
@{
    string serviceName = string.Empty;
    string partialName = string.Empty;
    if (Model != null && Model.serviceType != null)
    {
        serviceName = Model.serviceType.serviceName; partialName = Model.serviceType.partialName;
        ViewBag.Title = "IT服务申请 - " + @Model.serviceRequestID;
    }

    Layout = "~/Views/Shared/_DetailLayout.cshtml";
}
@using (Html.BeginForm())
{
    if (Model == null)
    {
    <div class="center_box_bg" style="height:200px;">
            <div class="ChannelTitle" style="height:200px; line-height:150px">
            <h2>该申请单不存在，或者您没有权限访问。</h2>
        </div>
    </div>
    }
    else
    {
    <div class="center_box_bg">
        <div class="ChannelTitle">
            <h2>@serviceName</h2>
        </div>
        <div class="line_top">
            <table>
                <tr>
                    <td>
                        <input type="button" id="backBtn" class="Button1 ui-icons subForward" value="返回上一页" />
                    </td>
                    <td style="width: 100%;">
                        @if (Model.actions != null)
                        {
                            @Html.Partial("ActionField", Model.actions)
                        }
                    </td>
                </tr>
            </table>
        </div>
        <div class="box_padding">
            @Html.HiddenFor(model => model.serviceRequestID, Model.serviceRequestID)
            @Html.Hidden("iptTempID", User.Identity.Name)
            @Html.ValidationSummary(true)
            @Html.Partial("UserInfoView", Model)
            @Html.Partial(partialName + "View", Model)
            @Html.Partial("ProcessSteps", Model)
        </div>
        <div class="line_top">
            @if (Model.actions != null)
            {
                @Html.Partial("ActionField", Model.actions)
            }
        </div>
    </div>
    <div id="greybackground">
    </div>
    <div class="popupWindow">
        <table border="0" cellpadding="0" cellspacing="0" class="INFORM_BOX">
            <tbody>
                <tr>
                    <td class="tdShadow">
                        <table width="100%" align="center" border="0" cellpadding="0" cellspacing="0">
                            <tbody>
                                <tr>
                                    <td class="tdBorder">
                                        <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                            <tbody>
                                                <tr>
                                                    <td class="tdTitle">
                                                        意见
                                                    </td>
                                                    <td align="right" class="btnFields">
                                                        <input class="Button1 ui-icons" id="btnCloseSuggestion" title="关闭" value="关闭" type="button" />
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                        <table id="tbViewSuggestions" class="border_line" width="100%" border="0" cellpadding="0"
                                            cellspacing="0">
                                            <tbody>
                                            </tbody>
                                        </table>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <div class="popupWindowSuggestion">
        <table border="0" cellpadding="0" cellspacing="0" class="INFORM_BOX">
            <tbody>
                <tr>
                    <td class="tdShadow">
                        <table width="100%" align="center" border="0" cellpadding="0" cellspacing="0">
                            <tbody>
                                <tr>
                                    <td class="tdBorder">
                                        <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                            <tbody>
                                                <tr>
                                                    <td class="tdTitle">
                                                        <label id="popupWindowTitle">
                                                        </label>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                        <table class="border_line" id="suggestionAreaTable" width="100%" border="0" cellpadding="0"
                                            cellspacing="0">
                                            <tbody>
                                                <tr>
                                                    <td width="30%" class="tdName">
                                                        <label id="suggestionAlias">
                                                        </label>
                                                    </td>
                                                    <td class="tdData">
                                                        <textarea id="txtSuggestionDesc" rows="8" cols="38" style="width: 80%; border: #e5e5e5 1px solid;"></textarea>
                                                    </td>
                                                </tr>
                                                <tr class='suggestionNewArea'>
                                                    <td width='30%' class='tdName'>
                                                        主任审批
                                                    </td>
                                                    <td class='tdData'>
                                                        <input type='checkbox' id='needDirtorApprove' />
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                        <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                            <tbody>
                                                <tr>
                                                    <td align="right">
                                                        <input class="Button1 ui-icons" id="btnSaveSuggestion" title="保存该意见" value="确定" type="button" />
                                                        <input class="Button1 ui-icons" id="btnCancelSuggestion" title="取消该意见" value="取消"
                                                            type="button" />
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    }
}
